home *** CD-ROM | disk | FTP | other *** search
Wrap
{\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fswiss Helvetica;} \paperw12740 \paperh8500 \margl120 \margr120 {\colortbl\red0\green0\blue0;} \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ul0\fs28 Appkit View setFlipped\ \ Q: \fc0 Why does my View lose its TIFF image after I made a call to \b setFlipped \b0 ? This is what I did, and the results I got.\ \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0 \ Description:\ 1. Create a viewScroller\ 2. Create an imageView\ 3. [viewScroller setDocView: imageView];\ 4. [imageView setFlipped:YES];\ 5. load tiff file into imageView\ 6. [imageView display];\ \ Results:\ 1. Without the setFlipped: call, my TIFF image shows up fine, with\ the scrollers sized respective to the imageView.\ 2. With the setFlipped: call, my TIFF image DOES NOT show up,\ BUT the scrollers are sized respective to the imageView\ AND the y-axis scrollbar shows at the top (like it should be).\ \ \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600 A: \fc0 \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0 If you composite your \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0 TIFF \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0 image at the point (0,0), after flipping the view, you won't see anything because the image is in fact now off-screen, i.e. showing at the top left corner \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0 \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0 (imagine the image height going beyond the y axis \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0 — \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0 growing upward). \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0 \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0 However, if you composite at the point (0, height of view rectangle), the image will be shown at the lower left corner. Now, if you composite at the point (0, height of the image), the image will be shown as hanging from the top left corner.\ \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0 \ Valid for 2.0\ \ QA695\ \